import { AxiosPromise } from 'axios'
// @ts-ignore
import request from '/@/utils/request'

const prefix = '/api/dms/order/group/'
// 新建订单获取组  id
export const orderGroupInsert: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}insert`, { data })
// 更新草稿  保存  提交 update
export const orderGroupUpdate: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}update`, { data })
// 获取订单组信息
export const orderGroupInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}info`, { data })
// 订单复制 copy
export const orderGroupCopy: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}copy`, { data })
// 订单组取消  cancel
export const orderGroupCancel: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}cancel`, { data })
// 标准销售订单列表
export const orderGroupList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })
//  主订单取消审批
export const orderGroupCancelApproval: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}cancelApproval`, { data })
//订单组筛选项
export const orderGroupOptions: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}options`, { data })
// 提单收货确认  receipt
export const orderGroupReceipt: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}receipt`, { data })
// 快递运输
export const orderGroupExpress: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}express`, { data })
// 订单组日志
export const orderGroupLog: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}log`, { data })
// 取订单组确认信息
export const orderGroupReceiptInfo: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}receiptInfo`, { data })
